{% extends "../docshell.html" %}
{% block title %}Reference Tables{% endblock %}
{% block navigation %}{% include 'navigation.html' %}{% endblock %}
{% block content %}
<h1>Reference Tables</h1>
<p>
  This page lists general reference material and other information that would
  be otherwise scattered through the source code.
</p>
<h3>Available Types</h3>
<p>Enumeration of the types that can be used to describe Rhizosphere models'
  attributes. The attribute type define the filtering and clustering operations
  that Rhizosphere will be able to perform on it, and the associated UI
  controls.
</p>
<p>
  The most up-to-date list of types is available in the
  <a href="http://code.google.com/p/rhizosphere/source/browse/src/js/rhizo.meta.js"><code>
    rhizo.meta.js</code></a> source file.
</p>
<dl class="apireference">
  <dt>rhizo.meta.Kind.STRING</dt><dd>Basic string.</dd>
  <dt>rhizo.meta.Kind.DATE</dt>
  <dd>
    Javascript
    <a href="https://developer.mozilla.org/en/JavaScript/Reference/global_objects/date">Date</a>.
  </dd>
  <dt>rhizo.meta.Kind.BOOLEAN</dt><dd>Boolean field.</dd>
  <dt>rhizo.meta.Kind.CATEGORY</dt>
  <dd>Single selection or multiple selection set.</dd>
  <dt>rhizo.meta.Kind.NUMBER</dt><dd>Integer number.</dd>
  <dt>rhizo.meta.Kind.RANGE</dt><dd>Integer range.</dd>
  <p class="note">
    <strong>Note</strong>. The following types belong to the
    <code>rhizo.meta.extra</code> package.
  </p>
  <dt>rhizo.meta.Kind.DECIMAL</dt><dd>Floating point number.</dd>
  <dt>rhizo.meta.Kind.DECIMALRANGE</dt><dd>Floating point range.</dd>
  <dt>rhizo.meta.Kind.LOGARITHMRANGE</dt><dd>Floating point range, with hint
      that values should be converted to logarithmic scale.</dd>
  <dt>rhizo.meta.Kind.STRINGARRAY</dt><dd>Comma separated list of strings.</dd>
</dl>

<h3>Available Layouts</h3>
<p>
  Enumeration of available layout algorithms. The most up-to-date list is
  available in the
  <a href="http://code.google.com/p/rhizosphere/source/browse/src/js/rhizo.layout.js"><code>
    rhizo.layout.js</code></a> source file.
</p>
<dl class="apireference">
  <dt>rhizo.layout.NoLayout</dt>
  <dd>No-op layout algorithm (it doesn't affect models' positions).</dd>
  <dt>rhizo.layout.FlowLayout</dt>
  <dd>Left to right, top to bottom linear list of models.</dd>
  <dt>rhizo.layout.ScrambleLayout</dt>
  <dd>Random positioning of models.</dd>
  <dt>rhizo.layout.BucketLayout</dt>
  <dd>Clusters models in buckets based on shared attribute values.</dd>
  <dt>rhizo.layout.TreeLayout</dt>
  <dd>Represents models in hierarchical trees (if a parent-child relationship
    exists in the model definition).</dd>
  <dt>rhizo.layout.TreeMapLayout</dt>
  <dd>Fits models in <a href="http://en.wikipedia.org/wiki/Treemapping">TreeMaps</a>.</dd>
</dl>

<a name="options"><h3>Runtime configuration options</h3></a>
<p>
  You can configure Rhizosphere behavior via runtime options that you can
  pass in at visualization bootstrap time, when you instantiate a new
  <code>rhizo.bootstrap.Bootstrap</code> or <code>rhizo.gviz.Rhizosphere</code>
  instance. Options are passed as a plain javascript object which is treated as
  a key-value map.
</p>
<h4>Global options</h4>
<dl class="apireference">
  <dt>allowConfigFromUrl (boolean, default: unset)</dt>
  <dd>
    If set, it allows the visualization to extract parameters from the current
    document location URL.
  </dd>
  <dt>selectfilter (string, default: '.rhizo-model:visible')</dt>
  <dd>
    the jQuery selector that identifies selectable items in the visualization.
    Affects the performance for selecting/unselecting items.
    It is unlikely that you have to change the default and strongly recommended
    to always define this option to match the selectable items as narrowly as
    possible.
  </dd>
  <dt>enableAnims (boolean, default: true)</dt>
  <dd>
    <p>
      Whether Rhizosphere should use animations to smooth transitions such
      as layouts and dynamic filtering.
    </p>
    <p>
      Rhizosphere will automatically reduce animations to improve performance
      when too many models are visualized on screen, but you can explicitly set
      this to disable all animations from the start to further improve
      performance.
    </p>
  </dd>
  <dt>enableHTML5History (boolean, default: true)</dt>
  <dd>
    Whether to use <a href="http://www.w3.org/TR/html5/history.html">
    HTML5 History</a> (if supported by the browser) to keep track of Rhizosphere
    state.
  </dd>
  <dt>cacheDimensions (boolean: default: unset)</dt>
  <dd>
    Whether Rhizosphere should cache renderings' dimensions.
    Greatly improves layout performance, but may result in layout bugs if the
    models you are visualizing change their rendering dimensions arbitrarily
    after the visualization initialization.
  </dd>
  <dt>platform (string, default: unset, allowed values: 'default'|'mobile')</dt>
  <dd>
    Forces Rhizosphere UI to adapt itself to the specified target platform.
  </dd>
  <dt>
    device
    (string, default: unset, allowed values: 'default'|'iphone'|'ipad'|'android')
  </dt>
  <dd>
    Forces Rhizosphere UI to adapt itself to the specified target device,
    bypassing device detection from the user-agent.
  </dd>
  <dt>
    template
    (string, default: unset, allowed values: rhizo.ui.component.templates enum)
  </dt>
  <dd>
    Forces Rhizosphere UI to use the specified layout template and chrome. This
    parameter can be set to any template name registered in the
    <code>rhizo.ui.component.templates</code> enumeration.
  </dd>
  <dt>
    layoutConstraints
    (object, default: unset,
    allowed keys: top, bottom, left, right, width, height)
  </dt>
  <dd>
    <p>
      Specifies a map of constraints for the area that Rhizosphere will use to
      lay out models' renderings. By default Rhizosphere will use the entire
      available viewport area for its layouts.
    </p>
    <p>
      With this option you can limit the part of the viewport that Rhizosphere
      will fill when laying out models' renderings. The following keys are
      accepted: <code>top</code>, <code>bottom</code>, <code>left</code>,
      <code>right</code>, <code>width</code> and <code>height</code>. Each value
      in the <code>[0.0, 1.0)</code> range is considered relative to the
      viewport width and height. It is otherwise assumed to be an absolute number
      of pixels otherwise. <code>width</code> and <code>height</code> properties
      take precedence respectively over <code>right</code> and
      <code>bottom</code>.
    </p>

    <p>
      Example:
      <code>{layoutConstraints: {top: 0.2, left: 0.2, width: 600, height: 600}}</code>
    </p>
  </dd>
  <dt>
    metamodel (object, default: unset, allowed values: see
    <a href="/doc/users_jsformat.html#metamodel">definition</a>)
  </dt>
  <dd>
    <p>Explicitly define the metamodel that Rhizosphere will use to interpret
      the data to visualize. Metamodels defined this way will
      <strong>override</strong> other metamodels passed to the bootstrapper
      during Rhizosphere initialization.
    </p>
    <p>Use this option to provide a metamodel when the loader you are using
      does not define one, or you want to customize it further.
    </p>
  </dd>
  <dt>
    metamodelFragment (object, default: unset, allowed values: see
    <a href="/doc/users_jsformat.html#metamodel">definition</a>)
  </dt>
  <dd>
    <p>
      Similarly to <code>metamodel</code>, use this option to partially modify
      the metamodel that Rhizosphere will use to interpret
      the data to visualize. Metamodels defined this way will
      <strong>extend</strong> other metamodels passed to the bootstrapper
      during Rhizosphere initialization. Any metamodel key defined within
      this option will override the equivalent key present in the
      bootstrapper-provided metamodel.
    </p>
    <p>
      Use this option to customize a metamodel when the loader you are using
      does not define an entirely acceptable one, and you want to customize or
      revise parts of it.
    </p>
  </dd>
  <dt>
    renderer (object, default: unset, allowed values: see
    <a href="/doc/users_jsformat.html#renderer">definition</a>)
  </dt>
  <dd>
    <p>Explicitly define the renderer that Rhizosphere will use to draw
      the models in the dataset. Renderers defined this way will override other
      renderers passed to the bootstrapper during Rhizosphere initialization.
    </p>
    <p>Use this option to provide a renderer when the loader you are using
      does not define one, or you want to customize it further (for example,
      when you are loading resources from a Google Visualization API
      datasource).
    </p>
  </dd>
</dl>

<h4>Autorender-specific options</h4>
<p>
  This set of options is relevant only when Rhizosphere uses autorenderers
  (<code>rhizo.autorender.AR</code>), instead of custom-specified rendering
  algorithms.
</p>
<dl class="apireference">
  <dt>arMaster (string)</dt>
  <dd>
     An option currently used by the gviz loader when using the AutoRenderer
    option, to declare which gviz column represents the 'master' field in the
    AutoRenderer rendering.
  </dd>
  <dt>arSize (string)</dt>
  <dd>
    An option currently used by the gviz loader when using the AutoRenderer
    option, to declare which gviz column will be used for the 'size' auto
    scaling.
  </dd>
  <dt>arColor (string)</dt>
  <dd>
    An option currently used by the gviz loader when using the AutoRenderer
    option, to declare which gviz column will be used for the 'color' auto
    painting.
  </dd>
  <dt>arDefaults (boolean)</dt>
  <dd>
    An option currently used by the gviz loader when using the AutoRenderer
    option, to declare that the AutoRender should automatically locate
    the master, size and color fields when they are not explicitly specified.
  </dd>
  <dt>arNumFields (number, default: 5)</dt>
  <dd>
    An option currently used by the gviz loader when using the AutoRenderer
    option, to declare how many fields should be displayed by the AutoRenderer.
  </dd>
</dl>

<h3>URL parameters</h3>
<p>
  Rhizosphere understands the following URL parameters.
</p>
<p class="note">
  <strong>Note</strong>.
  Rhizosphere visualizations may decide to ignore URL parameters
  under certain conditions (for example, when multiple visualizations are
  present in a single document, as it would not be possible to decide which
  visualization is affected by which parameter).</p>
<dl class="apireference">
  <dt>src|source=<i>datasource_uri</i></dt>
  <dd>The datasource Rhizosphere should access to load the data to visualize.</dd>
  <dt>kb=(true|yes|1)</dt>
  <dd>Enables on-screen keyboard (for keyboardless touchscreens).</dd>
</dl>

<h3>Z-indexes used throughout Rhizosphere</h3>
<p>Rhizosphere relies on z-indexing to separate different layers of the UI.
  The following levels are used throughout the library.
</p>
<dl>
  <dt>0</dt>
  <dd>Ground level. Used by the viewport, universe and elsewhere where not
    explicitly specified.</dd>
  <dt>10</dt><dd>Synthetic renderings.</dd>
  <dt>50</dt><dd>Models' renderings.</dd>
  <dt>50+x</dt><dd>Nested treemaps layering.</dd>
  <dt>200</dt><dd>Expanded models' renderings.</dd>
  <dt>300</dt><dd>Left and right UI bars (where all controls are located
  in the standard desktop UI template).</dd>
  <dt>900</dt><dd>Selection glass panel.</dd>
  <dt>1000</dt><dd>Selection/Panning flip trigger.</dd>
  <dt>1100</dt><dd>Floating panesl (where all controls are located in the
    mobile UI template).</dd>
  <dt>1300</dt><dd>BottomBar (used in the mobile UI template).</dd>
  <dt>5000</dt><dd>Progressbar.</dd>
  <dt>10000</dt><dd>Models while being dragged.</dd>
  <dt>11000</dt><dd>Onscreen keyboard (when shown).</dd>
</dl>
{% endblock %}
